package com.one.blocks.security.exception;

import com.one.blocks.common.enums.CodeMsgEnum;
import com.one.blocks.security.enums.SecurityExceptionEnum;
import lombok.Getter;
import org.springframework.security.core.AuthenticationException;

/**
 * @author <a href="mailto:idler41@163.com">linfuxin</a> created by 2022-06-03 11:02:04
 */
@Getter
public class AuthcException extends AuthenticationException {
    private final CodeMsgEnum codeMsgEnum;

    public AuthcException(SecurityExceptionEnum securityExceptionEnum) {
        super(securityExceptionEnum.getMsg());
        this.codeMsgEnum = securityExceptionEnum;
    }
}
